export default {
	// 时间处理
	handleTime(Time){
		let oldTime = new Date(Time)
		let newTime = new Date() 
		
		// old时间
		let year =  oldTime.getFullYear()
		let month = oldTime.getMonth() + 1 
		let day = oldTime.getDate() - 2
		let hour = oldTime.getHours()
		let min  = oldTime.getMinutes()
		
		
		// new时间
		let nyear =  newTime.getFullYear()
		let nmonth = newTime.getMonth() + 1
		let nday = newTime.getDate() 
		let nhour = newTime.getHours()
		let nmin  = newTime.getMinutes()
		// 当天时间
		if(year === nyear && month === nmonth && day === nday){
			if(hour < 10){
				hour = '0' + hour
			}
			if(min < 10){
				min = '0' + min
			}
			return hour+'.'+min
		}
		// 昨天时间
		if(year === nyear && month === nmonth && day+1 === nday){
			if(hour < 10){
				hour = '0' + hour
			}
			if(min < 10){
				min = '0' + min
			}
			return '昨天'+hour+'.'+min
		}else{
			if(month < 10){
				month = '0' + month
			}
			if(day < 10){
				day = '0' + day
			}
			return month + '/' + day;
		}
	}
}